package chpt08;

import java.util.Scanner;
public class ScannerDelimiter {

	public static void main(String[] args){
		String msg = "2020: 2021: 2022 : 2023";
		try (Scanner in = new Scanner(msg)) {
			in.useDelimiter("\\s*:\\s*");
			while(in.hasNextInt()) {
				System.out.println(in.nextInt());
			}
		}
	}
}
